////
/// Shared Utilities
/// Typography
////

// For truncating single line text.
// @param {String} $display (optional) - The value to be used for `display`.
// @param {Boolean} $descender-fix (optional) - Sometimes descenders are cutoff by overflow.
@mixin text-truncate($display: block, $descender-fix: false) {
  $padding-bottom: if($descender-fix, 0.25em, null);
  display: $display;
  padding-bottom: $padding-bottom;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

// For preventing any text selection.
@mixin text-no-select {
  pointer-events: none;
  user-select: none;
}
